package edu.hcmiu.portal.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.List;


/**
 * <a href="user_Soap.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class is used by
 * <code>edu.hcmiu.portal.service.http.user_ServiceSoap</code>.
 * </p>
 *
 * @author Brian Wing Shun Chan
 *
 * @see edu.hcmiu.portal.service.http.user_ServiceSoap
 *
 */
public class user_Soap implements Serializable {
    private long _userId;
    private String _screenName;

    public user_Soap() {
    }

    public static user_Soap toSoapModel(user_ model) {
        user_Soap soapModel = new user_Soap();

        soapModel.setUserId(model.getUserId());
        soapModel.setScreenName(model.getScreenName());

        return soapModel;
    }

    public static user_Soap[] toSoapModels(user_[] models) {
        user_Soap[] soapModels = new user_Soap[models.length];

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModel(models[i]);
        }

        return soapModels;
    }

    public static user_Soap[][] toSoapModels(user_[][] models) {
        user_Soap[][] soapModels = null;

        if (models.length > 0) {
            soapModels = new user_Soap[models.length][models[0].length];
        } else {
            soapModels = new user_Soap[0][0];
        }

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModels(models[i]);
        }

        return soapModels;
    }

    public static user_Soap[] toSoapModels(List<user_> models) {
        List<user_Soap> soapModels = new ArrayList<user_Soap>(models.size());

        for (user_ model : models) {
            soapModels.add(toSoapModel(model));
        }

        return soapModels.toArray(new user_Soap[soapModels.size()]);
    }

    public long getPrimaryKey() {
        return _userId;
    }

    public void setPrimaryKey(long pk) {
        setUserId(pk);
    }

    public long getUserId() {
        return _userId;
    }

    public void setUserId(long userId) {
        _userId = userId;
    }

    public String getScreenName() {
        return _screenName;
    }

    public void setScreenName(String screenName) {
        _screenName = screenName;
    }
}
